{extend name="base" /} {block name="body"}
<div class="layui-body">
	<div class="navbar">
		<a><cite>商家管理</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>商城分类</cite></a>
	</div>
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<div class="layui-tab-content">
			<table class="layui-table layui-form">
				<thead>
					<th>分类名称</th>
					<th>添加时间</th>
					<th width="100">排序</th>
					<th>操作</th>
				</thead>
				<tbody>
					<a class="layui-btn layui-btn-normal" href="{:url('system/type_add')}"><i class="fa fa-plus-circle"></i> 添加</a>
					<form id="listForm">
						{foreach name="list" item="vo"}
							<tr>
								<td class="text-center">{$vo.id}</td>
								<td>
									{neq name="vo.level" value="1"}|{php}for($i=1;$i
									<$vo[ 'level'];$i++){echo ' ----';}{/php}{/neq} {$vo.name} </td>
										<td class="text-center">{$vo.sort}</td>
										<td class="text-center">
											<a href="{:url('type_add',['pid'=>$vo.id])}" class="btn btn-success bnt-sm">
												<i class="fa fa-level-down"></i> 添加下级</a>&nbsp;&nbsp;
											<a href="{:url('type_edit',['id'=>$vo.id])}" class="btn btn-primary bnt-sm">
												<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp;
											<a href="{:url('delete',['id'=>$vo.id,'table'=>'goodstype'])}" class="btn btn-danger bnt-sm ajax-delete">
												<i class="fa fa-trash-o"></i> 删除</a>
										</td>
							</tr>
							{/foreach}
					</form>
				</tbody>
			</table>
			
		</div>
	</div>
</div>
{/block}
{block name="js"}
<script>
	var GV = {
		current_controller: "{$controller}/types"
	};
</script>
{/block}
